home *** CD-ROM | disk | FTP | other *** search
/ L'Encyclopedie Des Jeux Video 8 / EJV8_CD2.ISO / ejv8-cd2 / somm.dxr / 00063_roll text.ls < prev    next >
Encoding:
Text File  |  2003-10-24  |  2.5 KB  |  92 lines

  1. property choix_line, forcol, select, roll, VieilLine, entreList
  2.  
  3. on getBehaviorTooltip me
  4.   return "Permet d'obtenir des rollovers sur les champs textes"
  5. end
  6.  
  7. on getPropertyDescriptionList
  8.   description = [:]
  9.   addProp(description, #forcol, [#default: 0, #format: #integer, #comment: "Couleur du champ ├á l'├⌐tat normal", #range: [#min: 0, #max: 255]])
  10.   addProp(description, #roll, [#default: 35, #format: #integer, #comment: "Couleur de la ligne en " & QUOTE & "Rollover" & QUOTE, #range: [#min: 0, #max: 255]])
  11.   addProp(description, #select, [#default: 255, #format: #integer, #comment: "Couleur de la s├⌐lection", #range: [#min: 0, #max: 255]])
  12.   return description
  13. end
  14.  
  15. on beginSprite me
  16.   choix_line = VOID
  17.   VieilLine = 0
  18.   entreList = 0
  19.   member(the memberNum of sprite the currentSpriteNum).foreColor = forcol
  20.   member(the memberNum of sprite the currentSpriteNum).scrollTop = 0
  21. end
  22.  
  23. on endSprite me
  24. end
  25.  
  26. on mouseDown me
  27.   if choix_line <> VOID then
  28.     set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to forcol
  29.   end if
  30.   if the mouseLine = -1 then
  31.     nothing()
  32.   else
  33.     choix_line = the mouseLine
  34.   end if
  35.   cursor(-1)
  36. end
  37.  
  38. on mouseLeave me
  39.   entreList = 0
  40.   set the foreColor of line VieilLine of member the memberNum of sprite the currentSpriteNum to forcol
  41.   cursor(-1)
  42. end
  43.  
  44. on mouseWithin me
  45.   entreList = entreList + 1
  46.   if the mouseLine <> -1 then
  47.     leNom = the mouseLine
  48.     mouse_sur_line(leNom)
  49.     if entreList = 1 then
  50.       VieilLine = leNom
  51.     end if
  52.     VieilLine = leNom
  53.   end if
  54.   cursor(280)
  55. end
  56.  
  57. on prepareFrame me
  58.   choix_ligne()
  59. end
  60.  
  61. on mouse_sur_line X
  62.   if X <> VieilLine then
  63.     if VieilLine = choix_line then
  64.       nothing()
  65.     else
  66.       set the foreColor of line VieilLine of field the memberNum of sprite the currentSpriteNum to forcol
  67.     end if
  68.     if X = choix_line then
  69.       nothing()
  70.     else
  71.       set the foreColor of line X of member the memberNum of sprite the currentSpriteNum to roll
  72.     end if
  73.   else
  74.     if X = choix_line then
  75.       nothing()
  76.     else
  77.       set the foreColor of line X of member the memberNum of sprite the currentSpriteNum to roll
  78.     end if
  79.   end if
  80. end
  81.  
  82. on choix_ligne me
  83.   global choix_line
  84.   if choix_line <> VOID then
  85.     set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to select
  86.   else
  87.     if choix_line <> VOID then
  88.       set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to forcol
  89.     end if
  90.   end if
  91. end
  92.